<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>曲率</title>
  <style>
    body {
      margin: 0;
      overflow: hidden;
    }
    canvas {
      outline: none;
    }
  </style>
</head>
<body>
  <script id="vertexShaderRaw" type="x-shader/x-vertex">
    attribute float curvature;

    varying float vCurvature;
    
    void main() {
      vec3 p = position;
			vec4 modelViewPosition = modelViewMatrix * vec4( p , 1.0 );
			gl_Position = projectionMatrix * modelViewPosition;
			vCurvature = curvature;
    }
  </script>
  <script id="fragmentShaderRaw" type="x-shader/x-fragment">
    varying float vCurvature;
    varying vec3 vViewPosition;

    void main() {
      gl_FragColor = vec4( vCurvature * 2.0, 0.0, 0.0, 0.0 );
    }
  </script>
  <script src="./_curvature.js" type="module"></script>
</body>
</html>